<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html dir="ltr" lang="en-gb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>帖子</title>
<link type="text/css" rel="Stylesheet"
	href="/PCT/StyleAll/styleLogIn.css" />
<link type="text/css" rel="Stylesheet" href="/PCT/StyleAll/styleAll.css" />
<style type="text/css">
.STYLE1 {
	font-size: 36px
}
</style>
</head>

<body class="browser-webkit can-transform has-shadows transform">
	<div class="header">
		<a> <img src="/PCT/image/Logo Small.png" width=1000px height=50px
			alt="Logo Small">
		</a>
	</div>
	<p>&nbsp;</p>
	<div class="page">
		<div id="page-header">
			<div id="search-box">
				<s:if test="#session.status.currentUser.userType == 1">病友：</s:if>
				<s:elseif test="#session.status.currentUser.userType == 2">医生：</s:elseif>
				<s:elseif test="#session.status.currentUser.userType == 3">管理员：</s:elseif>
				<a><s:property value="#session.status.currentUser.username" /></a>
				等级： <a><s:property value="#session.status.currentUser.rank" /></a>
				<img src="/PCT/image/2.png" width=15px height=15px> <a
					href=" <s:url action='logout' namespace='/secure'/>">退出</a>
			</div>

			<s:if test="#session.status.currentUser.userType != 0">
				<a
					href="<s:url action='redirectResult' namespace='/public'>
				<s:param name='redirectType' value='5' />
			</s:url>"
					class="button2">账户管理</a>
			</s:if>
			<a
				href="<s:url action='redirectResult' namespace='/public'>
				<s:param name='redirectType' value='10' />
			</s:url>"
				class="button2">我的群</a>
			<form id="search" name="search" action="/PCT/public/search.action"
				style="display: inline">
				关键字：<input name="target" type="text" /> <select name="searchType">
					<option value="post">搜索帖子</option>
					<option value="topic">搜索主题</option>
					<option value="group">搜索群</option>
				</select> <input type="submit" value="GO" class="button2" />
			</form>
		</div>
		<div id="page-body">
			<div class="nav-links">
				群名：
				<s:property value="#session.status.CurrentGroupName" />
			</div>
			<h2 class="title">
				<a><s:property value="title" /></a>
			</h2>
			<div style="display: none !important;">
				未读论坛<br>
			</div>
			<div id="p3" class="post bg2 unreadpost">
				<s:iterator value="#session.status.relatedPosts" status="itStatus"
					var="post">
					<div class="inner">
						<span class="corners-top"><span></span></span>
						<div class="postbody">
							<div class="content">
								<s:property value='#itStatus.count' />
								楼
							</div>
							<div class="content">
								<p>
									<s:property value="#post.content" />
								</p>
							</div>
						</div>
						<dl class="postprofile" id="profile3">
							<dt>
								<s:property value="#post.userID" />
							</dt>
							<br />
							<dd>
								<p>
									等级:
									<s:property value="#post.UserRank" />
								</p>
							</dd>
							<s:property value="#post.postTime" />
							<dd>
								<br /> <br /> <a
									href="<s:url action='postSA' namespace='/public'>
							<s:param name='type'>support</s:param>
							<s:param name='postID' value="#post.postID"/>
							<s:param name='topicID' value="#post.topicID"/>
							<s:param name='userID' value="#session.status.currentUser.username"/>
						 </s:url>"
									class="button2">顶</a>
								<s:property value="#post.support" />
								<br /> <br />
							</dd>
							<dd>
								<a
									href="<s:url action='postSA' namespace='/public'>
							<s:param name='type'>against</s:param>
							<s:param name='postID' value="#post.postID"/>
							<s:param name='topicID' value="#post.topicID"/>
							<s:param name='userID' value="#session.status.currentUser.username"/>
						 </s:url>"
									class="button2">踩</a>
								<s:property value="#post.against" />
							</dd>
							<br />
							<dd>
								<a
									href="<s:url action='reportBadInfo' namespace='/public'>
							<s:param name='postID' value="#post.postID"/>
							<s:param name='topicID' value="#post.topicID"/>
							<s:param name='userID' value="#session.status.currentUser.username"/>
							<s:param name='messageType'>true</s:param>
							<s:param name='groupName' value="#session.status.currentGroupName"/>
						 </s:url>"
									id="report" onclick="reportOK();" class="button2"> 举报</a>
							</dd>
						</dl>
						<span class="corners-bottom"><span></span></span>
					</div>
				</s:iterator>


			</div>

			<!--  <s:form action="public/replyTopic">
				<s:textarea name="postContent" label="内容"></s:textarea>
				<s:submit value="回复" />
				</s:form>
				-->


			<s:if test="(#session.status.currentUser.userType != 0)&&(#session.status.currentUser.userType<10)">

				<form id="myForm" action="public/replyTopic" method="post">

					<div class="panel">

						<div class="inner">
							<span class="corners-top"><span></span></span>

							<fieldset class="fields2">
								<dl>
									<dt>
										<label for="content" name="content">内容：</label><br>
									</dt>
									<dd>
										<textarea rows="10" tabindex="4" name="postContent"
											id="content" cols="40" value="" class="inputbox autowidth"
											title="内容"></textarea>
									</dd>
								</dl>
								<input type="submit" tabindex="9" name="submit" id="submit"
									value="发表" class="button1 default-submit-action">
							</fieldset>

							<span class="corners-bottom"><span></span></span>

						</div>

					</div>


				</form>
			</s:if>


		</div>
	</div>
	<div class="footer">
		<div class="copyright">
			<p class="copy-left">上海交通大学 软件学院</p>
			<p class="copy-right">
				设计风格 <a href=" http://www.artodia.com/">Artodia</a> 。
			</p>
		</div>
	</div>

</body>

</html>
